package com.lq.educationsystem.teacher.feign;

import com.lq.educationsystem.common.entiy.ScoreTb;
import com.lq.educationsystem.common.entiy.SubjectTb;
import com.lq.educationsystem.common.entiy.TeacherSubjectTb;
import com.lq.educationsystem.common.util.Result;
import com.lq.educationsystem.common.util.ResultPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "lq-subject",url = "http://localhost:12000/")
@Component
public interface SubjectFeign {

    /**
     * 批量查询数据
     */
    //批量查询数据通过teacherSubjectId
    @RequestMapping("/subject/teacher/base/query/subject")
    public ResultPage<TeacherSubjectTb> queryTeacherSubjectInfoByTeacherSubjectId(@RequestBody List<Integer> teacherSUbjectInfoIdList);

    /**
     * 通过subject 批量查询课程信息
     */

    //批量查询课程id
    @RequestMapping("/subject/base/query/batch/subject")
    public ResultPage<SubjectTb> queryBatchSubjectInfoBySubjectIdList(@RequestBody List<Integer> subjectIdListInfo);

    /**
     * 通过教师课程id查询教师所授课程
     */

    @RequestMapping("/subject/teacher/base/query/teacher")
    public ResultPage<TeacherSubjectTb> queryTeacherSubjectInfoByTeacherId(@RequestBody Integer teacherId);



    //通过id查询
    @RequestMapping("subject/base/querybyid")
    public Result<SubjectTb> queryById(@RequestBody SubjectTb subjectTb);

}
